@{
    ViewBag.Title = "添加用户";
    }
@section head{
   <script type="text/javascript">
       $(document).ready(function () {
           $('.btnSubmit').click(function () {
               ajax_submit('#content', undefined, function (r) {
                   if (r.success) {
                       EasyuiForm.clear('#content');
                       $('#IsLock').combobox('setValue', 'false');
                   }
               });
           });
       });

       function isLockChange(record) {
           if (record.value == 'false') {
               $('#LockFailTimeTr').hide();
               $('#LockFailTime').datetimebox('setValue', null);
           }
           else {
               $('#LockFailTimeTr').show();
           }
           

       }
   </script>
}
@section body{
<body>
   <div class="easyui-layout" data-options="fit:true">
        <div data-options="region:'north',border:false">
            <div class="navigation">
                <div class="left">
                   @ViewBag.CurrentPath 添加
                </div>
                <a href="javascript:CloseMe();" class="back">后退</a>
            </div>
            <div class="expand_margin"></div>
        </div> 
        <div id='content' data-options="region:'center',border:false" >
             <div class="easyui-tabs" data-options="plain:true,border:false,fit:true">
                <div title="编辑用户信息">  
                    <table class="form_table">
                        <col width="180px"/>
                        <tbody>
                            <tr>
                                <th>用户名：</th>
                                <td><input type="text" name="UserName" class="easyui-validatebox imedisable" data-options="required:true,validType:['length[1,32]','Account']" style="text-transform:uppercase;" /></td>
                            </tr>
                            @if(OA.BLL.LoginUser.LoginManager.ManagerType== OA.Common.EnumType.ManagerType.Super)
                            {
                            <tr>
                                 <th>用户类型</th>
                                 <td>
                                      @Html.Raw(OA.UI.Controls.RadioByDictionary("ManagerType","ManagerType", null,null))
                                 </td>
                            </tr>
                             }
                            <tr>
                                <th>登录密码：</th>
                                <td><input type="password" name="Password" id="Password" class="easyui-validatebox" data-options="required:true" /></td>
                            </tr>
                            <tr>
                                <th>确认密码：</th>
                                <td><input type="password" class="easyui-validatebox combo-text" data-options="required:true" validType="Compare['#Password','[登录密码]']"  /></td>
                            </tr>
                            <tr>
                                <th>姓名：</th>
                                <td><input type="text" name="RealName" class="easyui-validatebox" data-options="required:true" data-options="required:true,validType:['length[1,64]']"  /></td>
                            </tr>
                            <tr>
                                <th>部门：</th>
                                <td>
                                    <input name="GroupID" class="easyui-combotree" data-options="url:'@Url.Action("GroupTree","ManagerGroup")',lines:true" style="width:155px;" />
                                </td>
                            </tr>
                            <tr>
                                <th>电话：</th>
                                <td><input type="text" name="Telephone" class="easyui-validatebox" data-options="validType:'phone'"  /></td>
                            </tr>
                            <tr>
                                <th>邮箱：</th>
                                <td><input type="text" name="Email" class="easyui-validatebox" data-options="required:true,validType:'email'" /></td>
                            </tr>
                            <tr>
                                <th>账户状态：</th>
                                <td> 
                                    <select name="IsLock" id="IsLock" class="easyui-combobox" data-options="panelHeight:'auto',onSelect:isLockChange" style="width:80px;">  
                                        <option value="false">正常</option>  
                                        <option value="true">锁定</option>                          
                                    </select>  
                                </td>
                            </tr>
                            <tr id="LockFailTimeTr" style="display:none;">
                                <th>锁定失效时间：</th>
                                <td>
                                    <input class="easyui-datetimebox" style=" width:155px;" id="LockFailTime"  name="LockFailTime" data-options="showSeconds:true" >  
                                </td>
                            </tr>
                            <tr>
                               <th></th>
                               <td>
                                  <input type="submit" value="提交保存" class="btnSubmit" />
                               </td>
                            </tr>
                        </tbody>
                    </table>
                </div>          
            </div>
        </div>
    </div>
</body>
}
